<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
   <%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Dish Information</title>
<link href="css/main.css" rel="stylesheet" type="text/css">
</head>
<body>
	<form id="logoutForm" action="UserServlet" method="post">
 	<input type="hidden" name="action" value="logout"/>
 </form>
 <form id="loadFavouries" action="UserServlet" method="post">
 	<input type="hidden" name="action" value="loadFavouries"/>
 </form>

<jsp:include page="top-nav-bar.jsp"/>
<div class="container">
  <div class="header">
  	<img class="header-image" src="img/header-image.png" alt="Cherry" name="header_image" id="header_image"/>
  </div><!-- end .header -->
  
  <div class="main-navigation">
  	<c:import url="WEB-INF/xml/diet.xml" var="xmlDietDoc"/>
	<c:import url="style-sheet/diet.xsl" var="xslDietDoc"/>
	<x:transform xml="${xmlDietDoc}" xslt="${xslDietDoc}"/>
	
  	<c:import url="WEB-INF/xml/recipe.xml" var="xmlRecipeDoc"/>
	<c:import url="style-sheet/recipe.xsl" var="xslRecipeDoc"/>
	<x:transform xml="${xmlRecipeDoc}" xslt="${xslRecipeDoc}"/>
  </div>
  <c:if test="${not empty requestScope.DISHDTO}">
  	<c:set var="dishDTO" value="${requestScope.DISHDTO}"></c:set>
  	
  	<div class="dish-info-container">
  		<div>
  			<h4>${dishDTO.name }</h4>
  			<div>${dishDTO.description}</div>
  		</div>
  		<img src="${dishDTO.imgPath}"/>
  	</div>
  </c:if>
  <c:if test="${empty requestScope.DISHDTO}">
  	<div class="dish-info-container">
  		<div>
  			<h4>${param.name}</h4>
  			<div>${param.description}</div>
  		</div>
  		<img src="${param.imgPath}"/>
  	</div>
  	<strong>Calo: </strong>${param.calo}<br/>
  	<strong>Cooking way: </strong>${param.cooking}<br/>
  </c:if>
  
  <div class="footer">
  	<img src="img/fptuniversity.png"/>
    <span style="position:absolute">FPT University</span>
  </div>
</div>
</body>
</html>